<?php
 
// No direct access
 
defined( '_JEXEC' ) or die( 'Restricted access' );
 
jimport( 'joomla.application.component.model' );

class ShopModelCategory extends JModel
{
    
    function getItemsList($category)
    {
        $db =& JFactory::getDBO();
		
		
		$query = "SELECT * FROM #__nix_goods WHERE cat_id=$category AND published=1 ORDER BY name ASC";
		$db->setQuery($query);
		$res = $db->loadObjectList();
		
		return $res;
    }
}
?>